# -*- coding: utf-8 -*-
import os
import time
print('find the log dir:\n')
filename=r'feiq.fql'  #the file you want to find
rootdir=["C:\\","D:\\","E:\\","F:\\"]
feiq_path=[]
for root_dir in rootdir:
    for root,dirs,files in os.walk(root_dir):
        if filename in files:
            feiq_path.append(root+os.sep+filename)
print(feiq_path)

for path in feiq_path:
    with open(path,'w',encoding='gbk',errors='ignore') as f:
        print('Now,delete the log files of feiq:\n%s'%path)
        f.write('byru\n%s'%(time.strftime('%Y%m%d%H%M%S')))
print('It is ok ...\nExit...')
time.sleep(2)


